package com.ocom.company.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ocom.common.entity.card.EntityXfMerchantInfo;
import com.ocom.common.enums.DataSourceEnum;
import com.ocom.company.dao.IDaoXfMerchantInfo;
import com.ocom.company.service.XfMerchantInfoService;
import com.ocom.mysql.aspect.DataSourceAspect;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class XfMerchantInfoServiceImpl extends ServiceImpl<IDaoXfMerchantInfo, EntityXfMerchantInfo> implements XfMerchantInfoService {


    @Override
    @DataSourceAspect(type = DataSourceEnum.PART_DB,companyId = "companyId")
    public List<EntityXfMerchantInfo> getMerchList(Long companyId,List<Long> comIds) {
        QueryWrapper<EntityXfMerchantInfo> queryWrapper =new QueryWrapper<>();
        queryWrapper.in("com_id",comIds);
        return this.list(queryWrapper);
    }

}
